package com.hc.dto;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 博客
 *
 * @author 梁云亮
 */
@ApiModel(value = "com-hc-domain-Blog")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_blog")
public class ListBlogDTO implements Serializable {
    private static final long serialVersionUID = 3539135881292934243L;
    /**
     * 编号
     */
    @ApiModelProperty(value = "编号")
    private Integer id;

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    private String title;

    /**
     * 内容简介：显示博客内容的前150个字
     */
    @ApiModelProperty(value = "内容")
    private String content;

    /**
     * 首图
     */
    @ApiModelProperty(value = "首图")
    private String img;

    /**
     * 浏览数
     */
    @ApiModelProperty(value = "浏览数")
    private Integer views;

    /**
     * 点赞数
     */
    @ApiModelProperty(value = "点赞数")
    private Integer agrees;

    /**
     * 来源：原创、转载、翻译
     */
    @ApiModelProperty(value = "来源：原创、转载、翻译")
    private Integer source;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime updateTime;
}
